﻿using System;
using System.Collections.Generic;
using System.Text;
using CONTROLADORA;
using System.Windows.Forms;
using MODELO;

namespace VISTA.Controles
{
    public class FormularioComboBox : ComboBox
    {

        Formularios controladoraFormularios = new Formularios();

        public FormularioComboBox()
        {
        }

        protected override void InitLayout()
        {
            base.InitLayout();
            this.CargarControl();
        }

        private void CargarControl()
        {
            dtsFormularios ds = controladoraFormularios.GetFormularios();

            this.DataSource = ds.Formulario;

            this.ValueMember = ds.Formulario.ID_FormularioColumn.ColumnName;
            this.DisplayMember = ds.Formulario.NombreColumn.ColumnName;

        }

    }
}
